package com.lsx.logisticscore.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.logging.SimpleFormatter;
@Data
@TableName("account_info")
public class Account implements Serializable {
    @TableId(type = IdType.AUTO)
    private Integer accountId;

    private String avatar;

    private String username;

    private String password;

    private String registryCode;

    private Date registryDate;

    private String empId;

    private String empName;

    private String role;

    @TableField(exist = false)
    private String type;

    private static final long serialVersionUID = 1L;


    public String getRegistryDate() {
        if (this.registryDate != null){
            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
            String date = sdf.format(this.registryDate);
            return date;
        }
        return null;
    }

}